package com.test;

/**
 * @Author: LiQingBo
 * @Date: 2021/6/20-06-20-14:47
 * @Description: com.test
 * @version: 1.0
 */
public class Dog implements Comparable<Dog>{
    int food;

    public Dog(int food) {
        this.food = food;
    }

    @Override
    public int compareTo(Dog d) {
        return Integer.compare(this.food, d.food);
    }

    @Override
    public String toString() {
        return "Dog{" +
                "food=" + food +
                '}';
    }
}
